package practices;
/*
 * 求555555的约数中最大的三位数
 */

import java.util.Scanner;

public class P01_Max {
    public static void main(String[] args) {
//        int num=555555;
        Scanner scan = new Scanner(System.in);
        System.out.print("Please input a num:");
        int num = scan.nextInt();
        int j;
        for(int i=999;i>=100;i--){
            j=num%i;
            if(j==0){
                System.out.println("The max factory with 3 digits in "+num+" is:"+i);
                break;
            }
        }
    }
}
